<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
        <link href="${pageContext.request.contextPath}/images/favicon.ico" mce_href="images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <title>软件园加油站</title>
        <link rel="stylesheet" href="${pageContext.request.contextPath}/css/weui.css"/>
        <link rel="stylesheet" href="${pageContext.request.contextPath}/css/wechat.css"/>
    </head>
    <body ontouchstart>
        <div class="container js_container">

        </div>
        <div class="page">
            <div class="refuel-container">
                <div class="refuel-info">
                    <p><b class="text-blue">${map['prPrice'].prStandard}</b>${map['prPrice'].prName} 汽油</p>
                </div>
                <div class="refuel-info">
                    <p><b class="text-blue">${map['prPrice'].fpNo}</b> 号枪</p>
                    <input type="hidden" value="${map['prPrice'].fpId}" id="fpId" name="fpId"/>
                     <input type="hidden" value="${map['prPrice'].stationId}" id="stationId" name="stationId"/>
                     <input type="hidden" value="${map['member'].isCheckFuellingPw}" id="isCheckFuellingPw" name="isCheckFuellingPw"/>
                     <input type="hidden" value="${map['member'].memberId}" id="memberId" name="memberId"/>
                </div>
            </div>
            <div class="bd">
                <div class="weui_cells_title">你的账户余额是 <b class="text-red">${map['member'].amount}</b> 元</div>
                <div class="weui_cells weui_cells_form">
                    <div class="weui_cell">
                        <div class="weui_cell_bd weui_cell_primary">
                            <input class="weui_input" type="number"  id="new_amount" placeholder="请输入加油金额"/>
                            <input class="weui_input" type="hidden" id="memberFrozenAmount" name="memberFrozenAmount"/>
                        </div>
                    </div>
                </div>
                <div class="weui_btn_area">
                    <a href="javascript:;" class="weui_btn weui_btn_primary"  onclick="authorization.submit()" id="showLoadingToast">确认加油</a>
                    <p class="text-center text-gray alert-info">余额不足？
                    <a href="${pageContext.request.contextPath}/scanRefueling/pointAuth?stationId=${map['prPrice'].stationId}&fpId=${map['prPrice'].fpId}&memberId=${map['member'].memberId}">积分卡登记</a></p>
                </div>
            </div>

            <!-- loading toast -->
            <div id="loadingToast" class="weui_loading_toast" style="display:none;">
                <div class="weui_mask_transparent"></div>
                <div class="weui_toast">
                    <div class="weui_loading">
                        <div class="weui_loading_leaf weui_loading_leaf_0"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_1"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_2"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_3"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_4"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_5"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_6"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_7"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_8"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_9"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_10"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_11"></div>
                    </div>
                    <p class="weui_toast_content">数据加载中</p>
                </div>
            </div>

        </div>
        <div class="footer">
            <span>本服务由</span>
            <img src="${pageContext.request.contextPath}/images/logo.png" title="油掌柜" />
            <span>提供技术支持</span>
        </div>
        <script src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
        <script src="${pageContext.request.contextPath}/js/zepto.min.js"></script>
        <script src="${pageContext.request.contextPath}/js/wechat.js"></script>
        <script>
        $(function () {
            $('#showLoadingToast').click(function() {
                var $loadingToast = $('#loadingToast');
                if ($loadingToast.css('display') != 'none') {
                    return;
                }

                $loadingToast.show();
                setTimeout(function () {
                    $loadingToast.hide();
                }, 2000);
            });
        });
        var authorization = {
        		submit : function (){
        			
        			var new_amount = $("#new_amount").val();
        			if(new_amount == "加满"){
        				new_amount = 9999.99;
        			}
        			$("#memberFrozenAmount").val(new_amount);
        			$("#authorization_form").submit();
        		}	
        	}
        </script>
    </body>
</html>